<!DOCTYPE html>
<html>
<head>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="initial-scale=1, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"/>
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta http-equiv="Access-Control-Allow-Origin" content="*"/>
  <meta http-equiv="X-Frame-Options" content="ALLOW-FROM">
  <meta http-equiv="pragma" content="no-cache" />
  <link href="../piece/css/piece.css" rel="stylesheet"/>
  <link href="../base/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
  <link href="../base/common.css" rel="stylesheet"/>
  <script type="text/javascript">
      // 轮循变量
      window.intRound = null ;
      // 打开进入APP参数
      window.sessionStorage["AppFrist"] = 0;

      var require = {
          urlArgs: "bust=" +  (new Date()).getTime()
      };

      var pieceConfig ={
          defaultModule:"news",
          defaultView:"news-list",
          loadMode:"module",
          enablePhoneGap:false
      };

      var oscAppVersion = "2.9";

    //创建js、css文件
    var createjscssfile = function(filename, filetype) {
      var fileref;
      if (filetype === "js") {  
        fileref = document.createElement('script');
        fileref.setAttribute("type", "text/javascript");
        fileref.setAttribute("src", filename);
        document.documentElement.appendChild(fileref);  

      } else if (filetype === "css") {
        fileref = document.createElement("link");
        fileref.setAttribute("rel", "stylesheet");
        fileref.setAttribute("type", "text/css");
        fileref.setAttribute("href", filename);
        document.documentElement.appendChild(fileref);  

      }
    };

    
      // 判断版本，然后清除上个版本的缓存
      var oscAppVersionOld = window.localStorage["oscAppVersion"];
      var userInformationToken =window.localStorage['user_token'];
      var userInformationMessage = window.localStorage['user_message'];
      var userInformationInfo= window.localStorage['user_info'];
      if (oscAppVersionOld === undefined|| oscAppVersionOld === null || oscAppVersion != oscAppVersionOld  ) {
          window.localStorage.clear();
          if(userInformationToken!=null || userInformationToken != undefined){
           window.localStorage["oscAppVersion"] = oscAppVersion;
          window.localStorage["user_token"]= userInformationToken;
          window.localStorage["user_message"]= userInformationMessage;
          window.localStorage["user_info"]= userInformationInfo;
          }
      };
 
      var platformVersion = navigator.userAgent;
      if (platformVersion.indexOf("Android")>-1 && platformVersion.indexOf("2.3")>-1) {
        createjscssfile("../base/android2.3.css","css");
      };
   

      // 打开APP时，判断expires是否超时
      var user_info = window.localStorage["user_token"];
      if(user_info!= null){
         var user_timeout = user_info.expires_in;
         var user_systime = user_info.addTime;
      }
      var timeNow = new Date().getTime();
      var calc = timeNow - user_systime;
      if ((calc / 1000) < user_timeout) {
          window.localStorage.removeItem("user_token");
          window.localStorage.removeItem("user_message");
          window.localStorage.removeItem("user_info");
      }
      //小屏幕，改变登陆框样式
      if(window.screen.height<500){
        createjscssfile("../base/smallScreen.css","css");
      }

  </script>

  <script type="text/javascript" src="../piece/js/piece-debug.js"></script>

</head>
<body>
  
</body>

</html>